#ifndef GAMECONTROLLER_H
#define GAMECONTROLLER_H
#include "cardprovider.h"
#include "userprovider.h"
#include "user.h"
#include "card.h"
#include "gamesettings.h"
#include "datasource.h"
#include <QList>
#include <QString>
class GameController
{
public:
    GameController();
    void updateProviders(int,int);
    QList<QString> get_user_list();
    void set_user(int index);
    Source get_user_src();
    Source get_card_src();
    QList<int> get_guessed_cards();
    void release_guessed_cards();
    Card get_first_notguessed_card();
    void add_guessed_card(int id);
    Card get_next_notguessed_card();
    Card get_prev_notguessed_card();
    void add_new_user(QString name);
    void save_users(void);

private:
    CardProvider* cardProvider;
    UserProvider* userProvider;
    int currentUserIndex;
    QList<User*> *users;
    QList<Card>* all_cards;
    QList<int> not_guessed_cards;
    int currCardId;
    void find_notguessed_cards();
    Card get_card_from_id(int id);

};

#endif // GAMECONTROLLER_H
